package com.lagou.transfer.configuration;

import com.alibaba.druid.pool.DruidDataSource;
import com.spring.annotation.Bean;
import com.spring.annotation.CommponentScan;
import com.spring.annotation.Configuration;

import javax.sql.DataSource;

@Configuration
@CommponentScan({"com.lagou.transfer"})
public class WebConfiguration {

    @Bean
    public DataSource getDataSource(){
        DruidDataSource dataSource =new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://127.0.0.1:3306/lagou");
        dataSource.setUsername("root");
        dataSource.setPassword("root");
        return dataSource;
    }
}
